We will now examine some particular cases of texture placement.
Label mapping
A common case of texture placement is when you need to apply a label over a surface. In our case we want to label the surface below.
Two textures must be prepared. The first one will be used as the label and it must have a black background (in our example we have created a magenta "sT" logo). The second texture will be used to mask the background of the first. Although the content is the same, the colors will be different: white the background, black the logo.
Now, after selecting the surface, open the Shading panel. Choose "decal uv" shader from the Color type. Through the "file name" parameter, select the first texture we have prepared.
The "decal uv" shader lets you specify the color of the surface that will be labeled and, optionally, its texture spacing. In our case, we will simply assign a chrome-like look by choosing "chrome" from the "Surface color" list.
It is time to use the second texture. From the Transparency type, choose the "wrapped image" shader and select the mask texture.
The sT logo has been labeled over the surface in a 1:1 ratio.
To adjust the logo position and scale it, we can work on texture spacing. Choose the "uv label" shader from the Texture Space type and set the parameters as follows: u origin = 0.7; v origin = 0.0; u scale = 0.3; v scale = 0.3. We have so scaled the sT logo by adjusting the "u scale" and "v scale" parameters while position has been determined by "u origin" and "v origin".
U and V repeat
Sometimes you may want to repeat a texture over a surface. Let's see how this is done.
Any texture can be easily applied to a surface by choosing the "wrapped image" shader form the Color type.
To control the number of repeats along the U and V directions, choose "uv" from the Texture Space shaders and adjust the "u scale" and "v scale" parameters.
To repeat the texture twice along both U and V, just set "u scale" and "v scale" as follows: u scale = 0.5; v scale = 0.5.
This technique can be used, for example, to create a tiled floor.
Texturing an uneven surface
Another interesting case is when you need to place a texture into the UV space of an uneven surface, i.e. a surface that appears to be stretched as in the figures below.
If you use the "uv" Texture Space shaders, the texture will follow the surface patches layout and the result will be an uneven texture.
Although this effect could sometimes be exactly what you are looking for, most often you will probably want the texture to be evenly mapped over the surface.
In this case, use the "z plane" shader and set the scale argument to 12.
The texture will appear as if mapped over an even surface.